--
-- Description: script to create the Cabs table.
-- Date created: 17 Apr 2008
--

set ANSI_NULLS on
set QUOTED_IDENTIFIER on
go

if not exists 
(
    select * 
    from dbo.sysobjects
    where id = object_id(N'[dbo].[Cabs]')
    and objectproperty(id, N'IsUserTable') = 1
)
begin
    create table [dbo].[Cabs]
    (
        [CabID] int not null
        , [CabSizeInBytes] bigint not null
        , [CabFileNameWithPath] varchar(2048) not null
        , [DateCreated] smalldatetime not null
        , [DateModified] smalldatetime not null
        , [EventID] bigint not null
        , [EventTypeID] smallint not null
        constraint [PK_Cabs] primary key clustered
        (
            [CabID] asc
        ) on [primary]
    ) on [primary]

    print ''
    print '*************************************************************************************'  
    print 'Created table [dbo].[Cabs]'
    print '*************************************************************************************'  
    print ''
end
else
begin
    print ''
    print '*************************************************************************************'  
    print 'Table [dbo].[Cabs] already exists.'
    print '*************************************************************************************'  
    print ''
end
